Skip to content

Fix incorrect #endif preprocessor comments in croutine.c and queue.c#1423

Merged
kstribrnAmzn merged 1 commit into
FreeRTOS:mainfrom
Zepp-Hanzj:fix/endif-preprocessor-comments
Jun 12, 2026
Merged

Fix incorrect #endif preprocessor comments in croutine.c and queue.c#1423
kstribrnAmzn merged 1 commit into
FreeRTOS:mainfrom
Zepp-Hanzj:fix/endif-preprocessor-comments

Conversation

@Zepp-Hanzj

Copy link
Copy Markdown
Contributor

Description

Fix two #endif preprocessor comments that don't match their corresponding #if conditions:

  1. croutine.c:405 — The #if condition is ( configUSE_CO_ROUTINES != 0 ) but the #endif comment incorrectly says == 0, reversing the logic.

  2. queue.c:566 — The #if condition is ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) but the #endif comment incorrectly says configSUPPORT_STATIC_ALLOCATION, naming the wrong configuration option.

These are purely cosmetic comment fixes with zero runtime impact.

Test Steps

  • Changes are limited to preprocessor comment text only.
  • No behavioral change — verified by successful build with -Wall -Wextra.
  • Self-explanatory by examining the #if / #endif pairs in the diff.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request. (N/A — comment-only change)

Related Issue

None

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

croutine.c: #if condition is ( configUSE_CO_ROUTINES != 0 ) but the
#endif comment incorrectly said == 0, reversing the logic.

queue.c: #if condition is ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
but the #endif comment incorrectly said configSUPPORT_STATIC_ALLOCATION,
naming the wrong configuration option.

These are purely cosmetic comment fixes with zero runtime impact.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
@Zepp-Hanzj Zepp-Hanzj force-pushed the fix/endif-preprocessor-comments branch from 8827c05 to a1f8a65 Compare June 8, 2026 09:42
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@kstribrnAmzn kstribrnAmzn enabled auto-merge (rebase) June 12, 2026 18:14
@kstribrnAmzn kstribrnAmzn merged commit 950ab4f into FreeRTOS:main Jun 12, 2026
17 checks passed
@Zepp-Hanzj Zepp-Hanzj deleted the fix/endif-preprocessor-comments branch June 15, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants